package entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @ClassName: Result
 * @Description: //TODO 用于控制器类返回结果
 * @Author: LL
 * @Date: 2019/4/25 21:03
 * @Version: V1.0
 */
@Data //getter、setter方法
@NoArgsConstructor //无参构造方法
@AllArgsConstructor //全参构造方法
@Accessors(chain = true) //链式结构
public class Result implements Serializable {

    private boolean flag;  //是否成功   

    private Integer code;  // 返回码   

    private String message;//返回信息  

    private Object data;   // 返回数据

    public Result(boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }
}
